package com.tuanzi.loan.business.entity.templateConf;

import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.io.Serializable;
import java.util.Date;

@Data
@Entity
@Table(name = "loan_api_activity")
@EntityListeners(AuditingEntityListener.class)
@DynamicInsert
public class LoanApiActivityEntity implements Serializable {

	private static final long serialVersionUID = 4097008453374260209L;

	@Id
	@Column(name = "id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	@Column(name = "api_name")
	private String apiName;

	@Column(name = "user_name")
	private String userName;

	@Column(name = "status")
	private Short status;

	@Column(name = "remark")
	private String remark;

	@Column(name = "ctime")
	@CreatedDate
	@Temporal(TemporalType.TIMESTAMP)
	private Date ctime;

	@Column(name = "uptime")
	@LastModifiedDate
	private Date uptime;

	@Column(name = "third_id")
	private Long thirdId;

	@Column(name = "third_name")
	private String thirdName;

}
